export function is_class(fn: any) {
	var toString = Function.prototype.toString;

	function fnBody(fn: any) {
		return toString
			.call(fn)
			.replace(/^[^{]*{\s*/, "")
			.replace(/\s*}[^}]*$/, "");
	}

	function is_class(fn: any) {
		return (
			typeof fn === "function" && (/^class(?:\s|{)/.test(toString.call(fn)) || /^.*classCallCheck\(/.test(fnBody(fn))) // babel.js
		);
	}
	return is_class(fn);
}
